package com.tcd.customer.mapper;

import com.tcd.pojo.Client.RecognizeeInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface RecognizeeInfoMapper {

    @Select("SELECT * FROM recognizee_info")
    List<RecognizeeInfo> getAll();

    List<RecognizeeInfo> query(String recognizeeName,String credentialsId);
    @Insert("INSERT INTO recognizee_info VALUES(#{recognizeeId},#{policyholdersId},#{recognizeeName},#{sex},#{credentialsType},#{credentialsId},#{telephone},#{address},#{bank},#{bankAccount},#{driverId},#{createTime},NULL,0)")
    int addPolicyholdersInfo(RecognizeeInfo recognizeeInfo);
    @Update("UPDATE recognizee_info SET recognizee_Name=#{recognizeeName},sex=#{sex},credentials_Type=#{credentialsType},credentials_Id=#{credentialsId},telephone=#{telephone},address=#{address},bank_Account=#{bankAccount},update_time=#{updateTime} WHERE recognizee_Id=#{recognizeeId}")
    int amendRow(RecognizeeInfo recognizeeInfo);
    @Delete("DELETE FROM recognizee_info WHERE recognizee_Id=#{param1}")
    int deleteRow(int recognizeeId);
}
